package com.furnitur.modules.admin.dto.auth;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.NotNull;
import javax.validation.Valid;

@Data
public class RegisterDTO {
    @NotBlank(message = "用户名不能为空")
    private String username;
    
    @NotBlank(message = "密码不能为空")
    private String password;
    
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;
    
    @NotNull(message = "角色类型不能为空")
    private Integer roleType; // 1-管理员 2-商家
    
    @Valid
    private MerchantDTO merchant; // 移除NotNull注解，商家注册时才需要
    
    @Data
    public static class MerchantDTO {
        private String shopName;
        private String description;
        private String address;
        private String businessLicense;
    }
} 